// -----------------------------------------------------------------------
//  <copyright file="UserExtendConfiguration.cs" company="LiuliuSoft">
//      Copyright (c) 2022-2024 DaprPlus. All rights reserved.
//  </copyright>
//  <site>https://www.dapr.plus</site>
//  <last-editor>郭明锋</last-editor>
//  <last-date>2024-05-10 17:05</last-date>
// -----------------------------------------------------------------------

using Liuliu.Fsb.Services.Identity.Domain.Entities;


namespace Liuliu.Fsb.Services.Identity.Infrastructure.EntityFrameworkCore.Configurations;

public class UserExtendConfiguration : EntityConfigurationBase<UserExtend>
{
    /// <summary>
    /// 重写以实现实体类型各个属性的数据库配置
    /// </summary>
    /// <param name="builder">实体类型创建器</param>
    public override void Configure(EntityTypeBuilder<UserExtend> builder)
    {
        builder.HasOne<User>().WithOne(n => n.UserExtend).HasForeignKey<UserExtend>(m => m.Id);
    }
}
